package main.chapter5.resource;/**
 * @Author xy
 * @Date 2020/6/16 21:06
 * @Description
 */

import javax.swing.*;
import java.io.InputStream;
import java.net.URL;

/**
 * 文件名称： main.chapter5.resource.ResourceTest.java</br>
 * 初始作者： xy</br>
 * 创建日期： 2020/6/16 21:06</br>
 * 功能说明： TODO <br/>
 * =================================================<br/>
 * 修改记录：<br/>
 * 修改作者        日期       修改内容<br/>
 * ================================================<br/>
 * Copyright (c) 2020-2021 .All rights reserved.<br/>
 */
public class ResourceTest {
    public static void main(String[] args) {
        Class cl = ResourceTest.class;
        URL aboutURL = cl.getResource("about.gif");
        ImageIcon icon = new ImageIcon(aboutURL);

        InputStream stream = cl.getResourceAsStream("data/about.txt");
        //String about = new String(stream.read(,"UTF-8");
    }
}
